/**
 * 
 */
package com.xb.demo6.prototype;

/**
 * @author kexue
 *
 */
public class TestMain {
	private static final String PEN = "pen";
	private static final String BOX = "box";
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		ProductManager manager=new ProductManager();
		
		manager.register(PEN, new UnderlinePen());
		manager.register(BOX, new MessageBox());

		
		Product pen1 = manager.create(PEN);
		Product pen12 = manager.create(PEN);
		Product box1 = manager.create(BOX);

		pen1.use();
		pen12.use();
		box1.use();
		
	}

}
